function generateGuid() {
	var result, i, j;
	result = '';
	for (j = 0; j < 32; j++) {
		if (j == 8 || j == 12 || j == 16 || j == 20)
			result = result + '-';
		i = Math.floor(Math.random() * 16).toString(16).toUpperCase();
		result = result + i;
	}
	return result;
}

function chkCode(value) {
	if (value == '') {
		return '';
	}
	work = '';
	for (lp = 0; lp < value.length; lp++) {
		unicode = value.charCodeAt(lp);
		if ((0xff0f < unicode) && (unicode < 0xff1a)) {
			work += String.fromCharCode(unicode - 0xfee0);
		} else if ((0xff20 < unicode) && (unicode < 0xff3b)) {
			work += String.fromCharCode(unicode - 0xfee0);
		} else if ((0xff40 < unicode) && (unicode < 0xff5b)) {
			work += String.fromCharCode(unicode - 0xfee0);
		} else if (unicode == 0xff1a) {
			work += String.fromCharCode(unicode - 0xfee0);
		} else {
			work += String.fromCharCode(unicode);
		}
	}
	return work;
}